﻿namespace 依赖注入的方式
{
    internal class Program
    {
        static void Main(string[] args)
        {
            //Console.WriteLine("Hello, World!");


            //{
            //     //接口注入
            //    Student student = new Student();
            //    student.Drive(new Benz());// 接口注入
            //}

            //{
            //    //构造函数注入
            //    N02.Student student = new N02.Student(new N02.Benz());
            //    student.Drive();

            //}

            {
                // SET属性注入
                N03.Student student = new N03.Student();
                student.SetCar(new N03.Benz());
                student.Drive();

            }

        }
    }
}
